import org.junit.jupiter.api.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.zs.aop01.Calculator;

public class ApoTest01 {

    @Test
    public void aop02test() {
//        AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(JavaConfig01.class);
//        Calculator bean = annotationConfigApplicationContext.getBean(Calculator.class);
//        System.out.println(bean.add(1, 3));
        ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("aop01.xml");
        Calculator bean = classPathXmlApplicationContext.getBean(Calculator.class);
        System.out.println(bean.add(1, 3));
    }
}
